home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_200
/
221_01
/
strcmp.asm
< prev
next >
Wrap
Assembly Source File
|
1980-01-01
|
640b
|
55 lines
;small-c V2.3
NAME strcmp
GLOBAL strcmp
strcmp
cc4
LDD 4,S
PSHS D
LDB [,S++]
SEX
PSHS D
LDD 4,S
PSHS D
LDB [,S++]
SEX
CMPD ,S++
LBNE cc3
JMP cc5
cc2
LDD 4,S
ADDD #1
STD 4,S
LDD 2,S
ADDD #1
STD 2,S
JMP cc4
cc5
LDD 4,S
PSHS D
LDB [,S++]
SEX
PSHS D
LDD #0
CMPD ,S++
LBNE cc6
LDD #0
RTS
cc6
JMP cc2
cc3
LDD 4,S
PSHS D
LDB [,S++]
SEX
PSHS D
LDD 4,S
PSHS D
LDB [,S++]
SEX
PULS X
PSHS D
TFR X,D
SUBD ,S++
RTS
END